<?php
/**
 * XIE--Scorpion
 *
 * 首页搜索
 *
 * time 2016-5-13
 */
namespace App\Http\Controllers\Home;

use Illuminate\Http\Request;
use DB,Input,Redirect,Session,url;
use App\Http\Requests;
use App\Http\Controllers\Controller;

class SearchController extends Controller
{
  
    /*搜索页面*/
    public function search()
    {
        $search_input=isset($_GET['search_input'])?$_GET['search_input']:'';
        $search=DB::table('enterprise')->join('position','enterprise.position_id','=','position.position_id')->join('post_message','enterprise.enterprise_id','=','post_message.enterprise_id')->join('enterprise_type','enterprise.enterprise_type_id','=','enterprise_type.enterprise_type_id')->where("position_name",'like',"%$search_input%")->get();

       return view('homes/list')->with('search',$search);

    }

}
?>